package com.xkdx.guangguang.fragment.user;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.xkdx.guangguang.module.network.AbsAction;

public class UserBindSinaAction extends AbsAction {


	private String userID,loginToken,sinaWeiboUserID,sinaWeiboNickName,sinaWeiboSex,sinaWeiboToken,sinaWeiboExpireTime;
	public UserBindSinaAction(String userID,String loginToken,String sinaWeiboUserID,String sinaWeiboNickName,String sinaWeiboSex,String sinaWeiboToken,String sinaWeiboExpireTime) {
		this.userID = userID;
		this.loginToken = loginToken;
		this.sinaWeiboUserID = sinaWeiboUserID;
		this.sinaWeiboNickName = sinaWeiboNickName;
		this.sinaWeiboSex = sinaWeiboSex;
		this.sinaWeiboToken = sinaWeiboToken;
		this.sinaWeiboExpireTime = sinaWeiboExpireTime;
	}

	@Override
	public void constructRequest() {

		HashMap<String, String> sinaloginmap = new HashMap<String, String>();
		sinaloginmap.put("DeviceID", "2");
		sinaloginmap.put("UserID", userID);
		sinaloginmap.put("LoginToken", loginToken);
		sinaloginmap.put("SinaWeiboUserID", sinaWeiboUserID);
		sinaloginmap.put("SinaWeiboNickName", sinaWeiboNickName);
		sinaloginmap.put("SinaWeiboSex", sinaWeiboSex);
		sinaloginmap.put("SinaWeiboToken", sinaWeiboToken);
		sinaloginmap.put("SinaWeiboExpireTime", sinaWeiboExpireTime);

		String loginJson = constructJson(sinaloginmap);

		Parameter parameter = new Parameter("userInterface", "bindSinaWeibo",
				loginJson);
		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);

		requestData = constructMod(list);
	}
	
}
